﻿package game.alternativa.ModelViewer {
	import alternativa.engine3d.lights.OmniLight;
	import alternativa.engine3d.core.events.Event3D;
	import alternativa.engine3d.primitives.GeoSphere;
	import alternativa.engine3d.materials.FillMaterial;
	
	public class ModelLight extends OmniLight  {
		
		public function ModelLight(color:uint = 0xffffff, attenuationBegin:Number = 0, attenuationEnd:Number = 300):void {
			
			super(color, attenuationBegin, attenuationEnd);
			
			this.addEventListener(Event3D.ADDED, added);
		}
		
		private function added(event:Event3D):void {
			//this.intensity = 0.1;
			
			/*var sphere:GeoSphere = new GeoSphere(10, 2, true, new FillMaterial(0xffffcc));
			sphere.x = this.x;
			sphere.y = this.y;
			sphere.z = this.z;
			sphere.rotationX = this.rotationX;
			sphere.rotationY = this.rotationY;
			sphere.rotationZ = this.rotationZ;
			this.parent.addChild(sphere);*/
			
		}
	}
}